package com.gaoxin.api.util;

public enum ImUrlEnum {

	url_0001("usercreate", "https://api.netease.im/nimserver/user/create.action"),
	url_0002("userupdate", "https://api.netease.im/nimserver/user/update.action"),
	url_0003("userblock", "https://api.netease.im/nimserver/user/block.action"),
	url_0004("userunblock", "https://api.netease.im/nimserver/user/unblock.action"),
	url_0005("updateUinfo", "https://api.netease.im/nimserver/user/updateUinfo.action"),
	url_0006("getUinfos", "https://api.netease.im/nimserver/user/getUinfos.action"),
	url_0007("friendadd", "https://api.netease.im/nimserver/friend/add.action"),
	url_0008("friendupdate", "https://api.netease.im/nimserver/friend/update.action"),
	url_0009("frienddelete", "https://api.netease.im/nimserver/friend/delete.action"),
	url_0010("sendBatchMsg", "https://api.netease.im/nimserver/msg/sendBatchMsg.action"),
	url_0011("teamcreate", "https://api.netease.im/nimserver/team/create.action"),
	url_0012("teamadd", "https://api.netease.im/nimserver/team/add.action"),
	url_0013("teamkick", "https://api.netease.im/nimserver/team/kick.action"),
	url_0014("teamremove", "https://api.netease.im/nimserver/team/remove.action"),
	url_0015("teamupdate", "https://api.netease.im/nimserver/team/update.action"),
	url_0016("teamquery", "https://api.netease.im/nimserver/team/query.action"),
	url_0017("sendMsg", "https://api.netease.im/nimserver/msg/sendMsg.action"),
	url_0018("upload", "https://api.netease.im/nimserver/msg/upload.action");

	private String code;
	private String url;

	ImUrlEnum(String code, String message) {
		this.code = code;
		this.url = message;
	}

	public String getCode() {
		return this.code;
	}

	public String getMessage() {
		return this.url;
	}

	public static String getUrlByCode(String code) {
		for (ImUrlEnum c : ImUrlEnum.values()) {
			if (c.code.equals(code)) {
				return c.url;
			}
		}
		return null;
	}
}
